<template>
  <div class="my-car-item">
    <div class="title">
      {{ orderMsg.vnName }}
    </div>
    <div></div>
    <div class="time-info marTop marBtm">
      <div class="time">
        {{ orderMsg.vtdName }}
      </div>
    </div>
	<van-image class="marTop" style="height:9.5rem;width:100%" :src="orderMsg.ulcFile[0].fileUrl"></van-image>
	<!-- <van-image v-else class="marTop" style="height:9.5rem;width:100%" :src="orderMsg.ulcFile[1].fileUrl"></van-image> -->
	<div class="time-info marTop">
	  <div class="time">
	    {{ orderMsg.ciNo }}
	  </div>
	</div>
  </div>
</template>

<script>
export default {
  props: {
    orderMsg: {
      type: Object,
    } 
  },
  data() {
    return {
      showImg: false
    };
  },
  methods: {
    orderStatus(num) {
      console.log('%c [ num ]', 'font-size:13px; background:pink; color:#bf2c9f;', num)
     /*  if (num === 1 || num === 2) {
        return "active-wait";
      } else if (num === 3) {
        return "finsh-pay";
      } else if (num === 4 || num === 5) {
        return "finsh";
      } */
      if (this.orderMsg.status == '00') {
        this.orderMsg.statusText = '待生成订单'
      }else if (this.orderMsg.status == '01') {
        this.orderMsg.statusText = '待支付'
      }else if (this.orderMsg.status == '02') {
        this.orderMsg.statusText = '寻车中'
      }else if (this.orderMsg.status == '03') {
        this.orderMsg.statusText = '购车事项通知书审核中'
      }else if (this.orderMsg.status == '04') {
        this.orderMsg.statusText = '购车事项通知书审核通过'
      }else if (this.orderMsg.status == '05') {
        this.orderMsg.statusText = '购车事项通知书审核不通过'
      }else if (this.orderMsg.status == '06') {
        this.orderMsg.statusText = '已完结'
      }else if (this.orderMsg.status == '07') {
        this.orderMsg.statusText = '已取消'
      }
       if (num == '00' || num == '01' || num == '02' || num == '03' || num == '05') {
        return "active-wait";
      } else if (num == '04') {
        return "finsh-pay";
      } else if (num == '06' || num == '07') {
        return "finsh";
      }


    }
  },
  created() {
    // console.log(this.orderMsg.ulcFile)
  }
};
</script>

<style scoped lang="less">
.active-wait {
  color: #fe8a17;
  background-color: rgba(254, 138, 23, 0.1);
  padding: 5px;
  border-radius: 2px;
}
.finsh {
  color: #999999;
  background-color: rgba(153, 153, 153, 0.1);
  padding: 5px;
  border-radius: 2px;
}
.finsh-pay {
  color: #0d7ef0;
  background-color: rgba(13, 126, 240, 0.1);
  padding: 5px;
  border-radius: 2px;
}
.my-car-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  // width: 375px;
  // height: 108px;
  background: #ffffff;
  padding: 16px 0;
  color: #333333;
  font-family: PingFangSC-Medium, PingFang SC;
  .title {
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .user-info {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    color: #666666;
    img {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background-color: #ffdecc;
    }
    .name {
      margin: 0 8px;
    }
    .phone {
      margin-left: 8px;
    }
  }
  .time-info {
    display: flex;
    justify-content: space-between;
    // margin-top: 15px;
    .time {
      font-size: 12px;
      font-weight: 400;
      color: #999999;
    }
    .order {
      font-size: 12px;
      font-weight: 400;
    }
  }
}
</style>